package com.o2o.cleaning.month.platform.ebusiness_plat.taobao

import com.o2o.utils.Iargs
import org.apache.spark.sql.SparkSession

/**
  * @ Auther: o2o-rd-0008
  * @ Date:   2021/2/22 16:52
  * @ Param:  ${PARAM}
  * @ Description: 
  */
object Check {
  def main(args: Array[String]): Unit = {
    val spark = SparkSession.builder()
      .appName(s"${this.getClass.getSimpleName}")
      .master("local[*]")
      .config("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
      .config("spark.debug.maxToStringFields", "50000")
      .getOrCreate()

    val sc = spark.sparkContext
    sc.hadoopConfiguration.set("fs.s3a.access.key", Iargs.OBSACCESS)
    sc.hadoopConfiguration.set("fs.s3a.secret.key", Iargs.OBSSECRET)
    sc.hadoopConfiguration.set("fs.s3a.endpoint", Iargs.OBSENDPOINT)
    sc.setLogLevel("WARN")


//    spark.read.json("s3a://o2o-dataproces-group/zsc/standardData/shopAddress_company/shop_20210222/").where("city='邢台市' and district='邢台县'").show()

    spark.read.orc("s3a://dws-data/zhongfang/nanzhuang/sourceData/2021/2/tmall_15/").printSchema()

  }
}
